package Data;

import org.hibernate.Session;
/**
 * file Manager for save, delete and update the file in the DB
 * 
 * @author Vladimir Sarkisyan & Erez Levy
 *
 */
public class FileManager {
 private Session session = null;
 public FileManager(Session session) {
  if(session == null)
    throw new 
      RuntimeException("Invalid session object.");
  this.session = session;
 }
 public void saveFile(FileData file){
  session.save(file);
 }
 public void updateFile(FileData file){
  session.update(file);
 }
}
